import { stringify } from 'qs';
import request from '../utils/request';

export async function getList(params) {
  return request.get(`/simcard/list?${stringify(params)}`, { method: 'GET', params:  params ? {page: params.current, size: params.pageSize } : {} }).then(e => e);
}

export async function findSimCardbyid(params) {
  return request(`/simcard/findOneDeviceId/${params}`, {
    method: 'GET',
  });
}

export async function simCardAdd(params) {
  return request.post('/simcard/add', {
    method: 'POST',
    data: {
      ...params,
    },
  });
}

export async function simCardEdit(params) {
  return request.post('/simcard/edit', {
    method: 'POST',
    data: {
      ...params,
    },
  });
}

export async function bindingdevice(params) {
  return request.post('/simcard/bindingdevice', {
    method: 'POST',
    data: {
      ...params,
    },
  });
}

